package top.lfyao.designpattern.details.flyweight;

public class FlyWeightClient {
    public static void main(String[] args){
        int extrinsicState=21;
        FlyWeightFactory flyWeightFactory = new FlyWeightFactory();
        FlyWeight fa = flyWeightFactory.getFlyWeight("a");
        fa.operation(--extrinsicState);
        FlyWeight fb = flyWeightFactory.getFlyWeight("b");
        fb.operation(--extrinsicState);
        FlyWeight fc = flyWeightFactory.getFlyWeight("c");
        fc.operation(--extrinsicState);
        UnshareConcreteFlyWeight uf = new UnshareConcreteFlyWeight();
        uf.operation(--extrinsicState);

    }

}
